import request from "@/utils/request";

//保存新订单
export const saveNewOrder = (order, num) => request.post('/order/saveOrder/' + num, order)
//分页查询订单
export const getOrdersByPage = (current, size) => request.get('/order/getByPage/' + current + '/' + size)
//根据手机号查询订单
export const getOrderByPhone = (current, size, phone) => request.get('/order/getByPage/' + current + '/' + size + '/' + phone)
//查询当年订单场地占比
export const getCurrentAreaRate = () => request.get('/order/getAreaRate')
//查询五年内不同年份的订单
export const getYearOrderData = () => request.get('/order/getYear')
//查询近六月的订单数
export const getMonthCurrent = () => request.get('/order/getMonth')
// 获取所有的时间段
export const getAllTime = () => request.get('/reservation/findAllReservation')
//新增预约时间段
export const addReservation = (reservation) => request.post('/reservation/addReservation', reservation)
//删除预约时间段
export const deleteReservation = (id) => request.get('/reservation/deleteReservation?uuid=' + id)
//修改预约时间段
export const updateReservation = (reservation) => request.post('/reservation/updateReservation', reservation)